package com.huqing.icu.rentgateway.service;

import org.springframework.stereotype.Service;

import java.util.function.Predicate;

@Service
public class GatewayService {

    //判断年龄大于20的方法1
    public void test() {
        A a = new A();
        a.test(20);

        //判断年龄大于20的方法2
        Predicate<Integer> result = age -> age > 20;

        //判断年龄大于20的方法3
        Integer age = 30;
        if (age > 20) {
            return;
        }

        //PrefixPathGatewayFilterFactory
        //PathRoutePredicateFactory
    }

    class A implements Predicate<Integer> {

        @Override
        public boolean test(Integer age) {
            return age > 25;
        }
    }
}
